import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

/**
 * @author gao
 * @date 2025/9/6 16:56
 */

public class TestDemo {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            int[] nums = new int[n];
            disOrder(nums);
            System.out.println("排序前：" + Arrays.toString(nums));
            Sort sort = new Sort();
            sort.bubbleSort(nums);
            System.out.println("排序后：" + Arrays.toString(nums));
        }
    }

    private static void disOrder(int[] nums) {
        Random ran = new Random();
        for (int i = 0; i < nums.length; i++) {
            nums[i] = ran.nextInt(100);
        }
    }
}